home *** CD-ROM | disk | FTP | other *** search
/ MacTech 1 to 12 / MacTech-vol-1-12.toast / Source / MacTech® Magazine / Volume 06 - 1990 / 06.01 Jan 90 / DLL Source Code / SampJJ.c < prev    next >
Encoding:
C/C++ Source or Header  |  1989-08-27  |  1.3 KB  |  46 lines  |  [TEXT/MPS ]

  1. /************************************************/
  2. /*                  Sample DLL's                */
  3. /*       Copyright © Vincent Parsons 1989.      */
  4. /************************************************/
  5. /*    DLL code for MPW C 3.0 or THINK C 4.0     */
  6. /*       with Excel for the Macintosh 2.2       */
  7. /*             and Microsoft C 5.1              */
  8. /*          with Excel for Windows 2.1          */
  9. /************************************************/
  10. /* SampJJ is an example of one data type J      */
  11. /* input and one data type J output.  The       */
  12. /* output is the lower 16 bits of the type J    */
  13. /* input.                                       */
  14. /************************************************/
  15. /*   =REGISTER("SampDLLs","SampJJ","JJ")        */
  16. /*   for both the Mac and the PC.               */
  17. /************************************************/
  18.  
  19. #include "DLL.h"
  20.  
  21. #if applec
  22. #include <Types.h>
  23.  
  24. #elif MSDOS
  25. #include <windows.h>
  26.  
  27. #endif
  28.  
  29. #if THINK_C
  30. pascal unsigned long main(unsigned long u1);    /* prototype */
  31.  
  32. pascal unsigned long main(u1)
  33. unsigned long u1;
  34.  
  35. #elif applec
  36. pascal unsigned long SampJJ(unsigned long u1)
  37.  
  38. #elif MSDOS
  39. unsigned long far pascal SampJJ(unsigned long u1)
  40. #endif
  41. {
  42.     return ( u1 & 0x0000FFFF );
  43. }
  44.  
  45. /************************************************/
  46.